import HTMLTestRunner_cn,yagmail

class Tools:

    def report(self):
        report = HTMLTestRunner_cn.HTMLTestRunner(open('./baogao.html','wb'),title='京东搜索测试报告')
        return report

    def email(self):
        email = yagmail.SMTP(user='3516922232@qq.com',password='sauvhzrimccccjbi',host='smtp.qq.com')
        email.send(to='3516922232@qq.com',subject='京东搜索',contents='报告如下',attachments=['baogao.html'])
        email.close()